<?php
namespace app\common\customer\validate;


use think\Validate;

class OperateCostValidate extends Validate
{
    protected $rule = [
        'id' => ['require', 'gt:0'],
        'source_id' => ['require', 'gt:0'],
        'cost_date' => ['require'],
        'cost' => ['require']
    ];

    protected $message = [
        'id.require' => '参数错误',
        'id.gt' => '客资参数错误',
        'source_id.require' => '请选择来源',
        'source_id.gt' => '来源参数错误',
        'cost_date.require' => '请选择日期',
        'cost.require' => '请录入金额',
    ];

    protected $scene = [
        'create' => ['source_id', 'cost_date', 'cost'],
        'update' => ['id', 'source_id', 'cost_date', 'cost'],
        'delete' => ['id']
    ];
}